Question: Let $C$ be a point not on line $AE$ and $D$ a point on line $AE$ such that $CD \perp AE.$ Meanwhile, $B$ is a point on line $CE$ such that $AB \perp CE.$ If $AB = 4,$ $CD = 8,$ and $AE = 5,$ then what is the length of $CE?$
Answer: We first draw a diagram: [asy]
pair A, C, E, B, D;
A = (0, 4);
B = (0, 0);
C = (-7, 0);
D = (-0.6, 4.8);
E = (3, 0);
draw(A--B);
draw(C--D);
draw(A--E);
draw(C--E);
draw(C--E);
draw(D--E, dotted);
label("$A$", A, SW);
label("$B$", B, S);
label("$C$", C, SW);
label("$D$", D, NE);
label("$E$", E, SE);
draw(rightanglemark(C,D,E,8));
draw(rightanglemark(A,B,E,8));
[/asy] This is a bit hard to comprehend, so let us add $\overline{AC}.$ [asy]
pair A, C, E, B, D;
A = (0, 4);
B = (0, 0);
C = (-7, 0);
D = (-0.6, 4.8);
E = (3, 0);
draw(A--B);
draw(C--D);
draw(A--E);
draw(C--E);
draw(C--E);
draw(D--E, dotted);
draw(A--C);
label("$A$", A, E);
label("$B$", B, S);
label("$C$", C, SW);
label("$D$", D, NE);
label("$E$", E, SE);
draw(rightanglemark(C,D,E,8));
draw(rightanglemark(A,B,E,8));
[/asy] Now we can see that $\overline{AB}$ and $\overline{CD}$ are altitudes to the triangle $ACE.$

That means we can come up with two different ways to find the area of $ACE.$ Setting them equal, we have: \begin{align*}
\frac{1}{2} \cdot AB \cdot CE &= \frac{1}{2} \cdot CD \cdot AE \\
AB \cdot CE &= CD \cdot AE \\
4 \cdot CE &= 8 \cdot 5 \\
CE &= \boxed{10}.
\end{align*}